<html>
<head>
<style>
p.li {
    position: relative;
}
</style>
</head>
<body>
<div id="container">
<p id="description"></p>
<div id="sample" contenteditable="true">
<p class="li" id="e0">Zero</p>
<p class="li" id="e1">One</p>
<p class="li" id="e2">Two</p>
<p class="li" id="e3"><br></p>
<p class="li" id="e4"><br></p>
<p class="li" id="e5"><br></p>
</div>
</div>
<div id="console"></div>
<script src="../../resources/js-test.js"></script>
<script>
description('Delete key should not remove extra nodes');
function $(id) { return document.getElementById(id); }
$('sample').focus();
var range = document.createRange();
range.setStart($('e5'), 1);
var selection = window.getSelection();
selection.removeAllRanges();
selection.addRange(range);
document.execCommand('Delete', true);
shouldBe('document.querySelectorAll("p.li").length', '5');
if (window.testRunner)
    $('container').outerHTML = '';
</script>
</body>
</html>
